home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
bipl.zip
/
PROGS.ZIP
/
DIFFWORD.ICN
< prev
next >
Wrap
Text File
|
1992-09-28
|
728b
|
28 lines
############################################################################
#
# File: diffword.icn
#
# Subject: Program to list different words
#
# Author: Ralph E. Griswold
#
# Date: May 9, 1989
#
###########################################################################
#
# This program lists all the different words in the input text.
# The definition of a "word" is naive.
#
############################################################################
procedure main()
local letter, words, text
letter := &letters
words := set()
while text := read() do
text ? while tab(upto(letter)) do
insert(words,tab(many(letter)))
every write(!sort(words))
end